package br.com.jr.arq.jsf;

import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Component;

import br.com.jr.arq.dominio.Usuario;
import br.com.jr.arq.utils.UFRNUtils;

@Component @Scope(value="session")
public class UsuarioMBean extends AbstractCrudMBean<Usuario> {

	@Override
	protected void beforeCadastrar() {
		obj.setEnabled(Boolean.TRUE);
		obj.setPassword( UFRNUtils.toMD5(obj.getPassword()) );
	}
	
}